components:
- name: Store
  params:
    host: <index ip>
    index: <index name>
    port: 80
    search_fields: ["title", "content"]
  type: ElasticsearchDocumentStore
- name: Retriever
  params:
    document_store: Store
    top_k: 100
  type: BM25Retriever
- name: Reranker
  params:
    batch_size: 32
    model_name_or_path: cross-encoder/ms-marco-MiniLM-L-6-v2
    top_k: 5
    use_gpu: true
  type: SentenceTransformersRanker
- name: AParser
  type: AnswerParser
- name: LFQA
  params:
    name: lfqa
    prompt_text: "Answer the question using the provided context. Your answer should be in your own words and be no longer than 50 words. \n\n Context: {join(documents)} \n\n Question: {query} \n\n Answer:"
    output_parser: AParser
  type: PromptTemplate
- name: Prompter
  params:
    model_name_or_path: MBZUAI/LaMini-Flan-T5-783M
    use_gpu: true
    model_kwargs:
      model_max_length: 2048
      torch_dtype: torch.bfloat16
    default_prompt_template: LFQA
  type: PromptNode
pipelines:
- name: query
  nodes:
  - inputs:
    - Query
    name: Retriever
  - inputs:
    - Retriever
    name: Reranker
  - inputs:
    - Reranker
    name: Prompter
version: 1.17.0
